Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-16661 common: Integrate PMDK logging system w/ VOS logging system. #14923

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

grom72
Copy link
Contributor

@grom72 grom72 commented Aug 13, 2024

pmemobj error and warning messages are written by default to stderr and syslog().
PMDK enables redirecting logging messages to user-specific functions.

All error and warning messages are reported using the DAOS logging function, to ensure a coherent events view for VOS and related pmemobj functions.

Before requesting gatekeeper:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate owners.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

Copy link

github-actions bot commented Aug 13, 2024

Ticket title is 'Integrate PMDK logging system w/ VOS logging system.'
Status is 'In Review'
https://daosio.atlassian.net/browse/DAOS-16661

@daosbuild1
Copy link
Collaborator

Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-14923/3/testReport/

@grom72 grom72 force-pushed the grom72/pmdk-w-logging branch 3 times, most recently from 75504b7 to ad62bd1 Compare September 3, 2024 07:38
To enable new message in log in NLT.
Allow-unstable-test: true

Priority: 2

Required-githooks: true

Co-authored-by: Jan Michalski <[email protected]>
Co-authored-by: Tomasz Gromadzki <[email protected]>

Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72 grom72 force-pushed the grom72/pmdk-w-logging branch from ad62bd1 to 149320c Compare September 3, 2024 10:59
@grom72 grom72 marked this pull request as ready for review September 3, 2024 11:01
@grom72 grom72 requested review from a team as code owners September 3, 2024 11:01
debian/changelog Outdated Show resolved Hide resolved
To enable new message in log in NLT.
Allow-unstable-test: true

Priority: 2

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72 grom72 requested a review from brianjmurrell September 3, 2024 20:56
Priority: 2

Allow-unstable-test: true
Skip-func-hw-test: false

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72 grom72 added the release-2.6.1 Targeted for release 2.6.1 label Sep 4, 2024
Skip-nlt: true
Priority: 2

Allow-unstable-test: true
Skip-func-hw-test: false

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
Copy link
Contributor

@brianjmurrell brianjmurrell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grom72 Packaging changes LGTM. Please re-request review from me once you have gotten your two +1s for the core code changes and I will +1 to remove my -1 review. I just don't want my +1 to be misunderstood to be for the core code changes also.

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium UCX Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14923/11/execution/node/1683/log

jolivier23
jolivier23 previously approved these changes Sep 5, 2024
@grom72 grom72 added release-2.6.2 Targeted for release 2.6.2 and removed release-2.6.1 Targeted for release 2.6.1 labels Sep 6, 2024
@grom72 grom72 requested a review from NiuYawei September 16, 2024 14:12
NiuYawei
NiuYawei previously approved these changes Sep 18, 2024
@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium UCX Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14923/12/execution/node/635/log

Skip-nlt: true
Priority: 2
Allow-unstable-test: true

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14923/36/execution/node/1349/log

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium Verbs Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14923/36/execution/node/1396/log

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium Verbs Provider completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-14923/37/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14923/38/execution/node/294/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14923/38/execution/node/297/log

@daosbuild1
Copy link
Collaborator

Test stage Test RPMs on EL 8.6 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-14923/38/display/redirect

Skip NLT tests for full HW validation
Skip-NLT: true

Skip-list: test_ior_intercept_libpil4dfs:DAOS-16260 test_daos_degraded_ec:DAOS-16503 test_dfuse_daos_build_wt_pil4dfs:DAOS-16732
Allow-unstable-test: true
Priority: 2

Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72
Copy link
Contributor Author

grom72 commented Jan 21, 2025

@grom72 grom72 requested review from jolivier23 and NiuYawei January 21, 2025 07:13
NiuYawei
NiuYawei previously approved these changes Jan 22, 2025
@grom72 grom72 requested review from ryon-jensen and brianjmurrell and removed request for brianjmurrell and ashleypittman January 23, 2025 21:18
pmdk_log_function(enum pmemobj_log_level level, const char *file_name, unsigned line_no,
const char *function_name, const char *message)
{
uint64_t dlog_prio = pmemobj_log_level_2_dlog_prio[level];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one example where pulling in PMDK into DAOS would be useful.

Anyway, this can be improved to be more efficient.

Add the following

#define _D_DEBUG_EXPANDED(func, flag, flag_var, ...)

Have _D_DEBUG call this with DD_FLAG(flag, D_LOGFAC) as the flag var.

In your case, you can have a map like the one you have above to each flag var

e.g. &DD_FLAG(DLOG_INFO, D_LOGFAC)

And instead of calling _D_DEBUG, call _D_DEBUG_EXPANDED with *flag_var you saved.

Additionally, one might consider passing these variables down to the lower level (e..g. register_debug_callback(callback, &DD_FLAG(...)). The check can just be if (*flag != 0) inside of pmdk and the upper level will take care of caching the value for the next call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The _D_DEBUG_W_SAVED_MASK macro (instead of _D_DEBUG_EXPANDED) has been added and the pmdk_log_function() has been adjusted.

Copy link
Contributor

@jolivier23 jolivier23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be improved

@jolivier23
Copy link
Contributor

#15810 for example

Co-authored-by: Jeff Olivier <[email protected]>
Co-authored-by: Tomasz Gromadzki <[email protected]>

Signed-off-by: Tomasz Gromadzki <[email protected]>
pmdk_log_function optimization based on _D_DEBUG_EXPANDED macro.

Skip NLT tests for full HW validation
Skip-NLT: true

Skip-list: test_ior_intercept_libpil4dfs:DAOS-16260
Allow-unstable-test: true
Priority: 2

Co-authored-by: Jeff Olivier <[email protected]>
Co-authored-by: Tomasz Gromadzki <[email protected]>

Signed-off-by: Tomasz Gromadzki <[email protected]>
Cancel-prev-build: false

Skip NLT tests for full HW validation
Skip-NLT: true

Skip-list: test_ior_intercept_libpil4dfs:DAOS-16260
Allow-unstable-test: true
@grom72 grom72 requested a review from jolivier23 January 30, 2025 16:48
@@ -28,5 +28,5 @@ ucx=https://github.com/openucx/ucx.git
[patch_versions]
spdk=https://github.com/spdk/spdk/commit/b0aba3fcd5aceceea530a702922153bc75664978.diff,https://github.com/spdk/spdk/commit/445a4c808badbad3942696ecf16fa60e8129a747.diff
mercury=https://raw.githubusercontent.com/daos-stack/mercury/f3dc286fb40ec1a3a38a2e17c45497bc2aa6290d/na_ucx.patch
pmdk=https://github.com/pmem/pmdk/commit/2abe15ac0b4eed894b6768cd82a3b0a7c4336284.diff
pmdk=https://github.com/pmem/pmdk/commit/2abe15ac0b4eed894b6768cd82a3b0a7c4336284.patch,https://github.com/pmem/pmdk/commit/61e32285370e629e2b36bbb991b919e44f87d915.patch,https://github.com/pmem/pmdk/commit/518b7426a13b21f98b2d2c435fa645770899446a.patch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this same patch applied in the PMDK rpm builder?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jolivier23, Patch https://github.com/pmem/pmdk/commit/2abe15ac0b4eed894b6768cd82a3b0a7c4336284.patch is not required for PMDK rpm builder as it is related to ARM architecture only.
The rest are the same.

@grom72 grom72 requested review from NiuYawei and removed request for brianjmurrell January 30, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants